package com.wu.cloudribbonfeign.api;

import com.wu.cloudribbonfeign.fallback.OrderServerBackFactory;
import com.wu.common.entity.ResultData;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author whx
 * @date 2021/7/10
 */
@FeignClient(name = "order-server",fallbackFactory = OrderServerBackFactory.class)
public interface OrderApi {

    @GetMapping("/order/list")
    ResultData orderList();

    @PostMapping("/order/getById")
    ResultData orderGetById(@RequestParam("id") Integer id);

    @GetMapping("order/findAll")
    ResultData orderFindAll();

    @PostMapping("order/update")
    ResultData orderUpdate(@RequestParam("id") int id);

}
